{extend name="A_public:index"/}
<title>{block name="title"}分类添加{/block}</title>
{block name="allinfo"}
<script src="/assets/js/jquery-1.8.3.min.js"></script>

	<div class="content-panel">
      <h4><i class="fa fa-angle-right"></i> 分类添加</h4><hr><table class="table table-striped table-advance table-hover" style="margin-bottom: 0px">        
      </table>
      <div class="form-panel">
          <form action='/user/insert' class="form-horizontal style-form" method="post">

              <div class="form-group">
                  <label class="col-sm-2 col-sm-2 control-label">根分类:</label>
                  <div class="col-sm-10" style="width: 230px">
                      <select name="status" id="sss" class="form-control" >
                          <option value="" disabled selected>=====请选择====</option>
                          {foreach $cate as $k=>$v}
                            <option value="{$v.pid}">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{$v.name}</option>
                          {/foreach}
                      </select>
                  </div>
              </div>

              <div class="form-group">
                  <label class="col-sm-2 col-sm-2 control-label">用户名:</label>
                  <div class="col-sm-10">
                      <input type="text" name="username" class="form-control" placeholder="请输入新的用户名...">
                  </div>
              </div> 

              <div class="form-group">
                  <label class="col-lg-2 col-sm-2 control-label"></label>
                  <div class="col-lg-10">
                      <input type="submit" class="btn btn-success" id="tj" value="提交" disabled>
                      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                      <input type="reset" class="btn btn-success" value="重置">
                  </div>
              </div>
          </form>
      </div>
  </div>


<script>


  //添加用户的时候必须要选择权限否则不让提交
  sss = $('#sss');
  sss.change(function(){
    if (sss.val()==null) {
     document.getElementById('tj').disabled=true;
    }else{
     document.getElementById('tj').disabled=false;

    }
  })
</script>
{/block}

